#!/bin/sh

# replace environment variable because this version of filebeat doesn't support environment variable in the config yaml file.
sed -i 's/\${DATAKIT_HOST}/'"${DATAKIT_HOST}"'/g' /opt/skywalking-agent/config/agent.config
sed -i 's/\${DATAKIT_PORT}/'"${DATAKIT_PORT}"'/g' /opt/skywalking-agent/config/agent.config
java -javaagent:/opt/skywalking-agent/skywalking-agent.jar -jar /root/MyJarFile.jar
